package com.ziwei.material.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ziwei.material.domain.po.SdsMaterialTask;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author: jl_zhang
 * @since: 2024/11/15 10:24
 **/
//任务表
@Mapper
public interface MaterialTaskMapper extends BaseMapper<SdsMaterialTask> {

    //导入结束,更新task表状态和导入数量
    void updateTaskImportCondition(@Param("importNum") int num, @Param("taskStatus") int taskStatus, @Param("taskId") Long taskId);

    //导入结束
    void updateTaskFailImportCondition(@Param("taskStatus") int taskStatus, @Param("taskId") Long taskId);

    void updateTaskDownloadCondition(@Param("downloadNum") int downloadNum, @Param("taskStatus") int taskStatus, @Param("taskId") Long taskId);

    //下载全部失败
    void updateTaskAllFailDownloadCondition(@Param("taskStatus") int taskStatus, @Param("taskId") Long taskId);
}
